<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>立方体的旋转</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        .box{
            width: 400px;
            height: 400px;
            margin: 10px auto;
            perspective: 1200px;
        }
        ul{
            width: 300px;
            height: 300px;
            margin: 130px;
            position: relative;
            transform-style: preserve-3d;
            animation: movers 4s infinite linear;
            transform-origin: center center 150px;
        }
        ul li{
            width: 300px;
            height: 300px;
            list-style: none;
            font-size: 30px;
            line-height: 300px;
            color: white;
            text-align: center;
            position: absolute;
            opacity: 0.1;
        }
        ul li img{
            width: 300px;
            height: 300px;
            background-size: 100%;
            opacity: 1;
        }
        ul li:nth-of-type(1){background-color: chocolate;opacity: 0.5}
        ul li:nth-of-type(2){background-color: crimson;opacity: 0.5;transform: translateX(300px)rotateY(-90deg);transform-origin: left}
        ul li:nth-of-type(3){background-color: cyan;opacity: 0.5;transform: translateX(-300px)rotateY(90deg);transform-origin: right}
        ul li:nth-of-type(4){background-color: darkorchid;opacity: 0.5;transform:translateY(-300px)rotateX(-90deg);transform-origin: bottom}
        ul li:nth-of-type(5){background-color: fuchsia;opacity: 0.5;transform: translateY(300px)rotateX(90deg);transform-origin: top}
        ul li:nth-of-type(6){background-color: coral;opacity: 0.5;transform:translateZ(300px)}
        @keyframes movers {
            from{transform: rotateY(0deg)}
            to{transform: rotateY(360deg)}
        }
    </style>
</head>
<body>
<div class="box">
    <ul>
        <li><img src="img/01.jpg"></li>
        <li><img src="img/06.jpg"></li>
        <li><img src="img/07.png"></li>
        <li><img src="img/05.jpg"></li>
        <li><img src="img/02.jpg"></li>
        <li><img src="img/04.jpg"></li>
    </ul>
</div>
</body>
</html>